/**
 * Created by lixiang01 on 2/10/2017.
 */

$(function () {

    var saleVue = new Vue({
        el:'#divController',
        data:{
            saleInfo:{
                productSysNo : "",
                color: "",
                size: "",
                salePrice:"",
                sex:"1",
                saleNum:"1",
                mobilePhone:""
            }

        },
        methods:{
            saveSale:function () {


                this.$http.post(webRoot+'/sale/newSaleInfo/', this.saleInfo,  {credentials: true}).then(function(response)
                    {
                        var datas = response.body;
                        if(datas['error']=='0'){
                            window.location.reload();
                        }else{
                            alert(datas['message']);
                        }

                    },
                    function(response){
                        // error callback
                    });

            },

        }

    });


});




